function Vcode(){
	this.name = '';
	this.id	=	'';
	this._prefix = 'v_';
	this._url	=	'v.php?_act=gen';

	this.init = function(name,id){
		this.name	=	name;
		this.id	=	id;
	}
	
	this.initHandlers = function(){
		;
	}

	this.reload = function(){
		$("#v_"+this.id).value = '';
		$("#img_"+this.id).src = this._url + '&' + Math.random();
	}

	this.getHTML = function(){
		var str = '';
		str += '<div class="scbox_l">';
		str += '<ul>';
        str += '<li>验证码：</li>';
        str += '<li><img src="'+this._url+'" id="'+('img_'+this.id)+'"/><a href="javascript:'+this.id+'.reload();">看不清换一张</a></li>';
        str += '</ul>';
    	str += '</div>';
    	str += '<div class="scbox_r">';
        str += '<ul>'
        str += '<li>请输入左边显示的验证码：</li>';
        str += '<li><input type="text" name="'+this.name+'" id="'+('v_' + this.id)+'" maxlength="4" size="4"/></li>';
        str += '</ul>';
        str += '</div>';
		return str;
	}

	this.write = function(){
		document.write(this.getHTML());
		this.initHandlers();
	}
}
